<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>侦听器</title>
</head>
<body>
	<div id="app">
		<input type="" name="" v-model="value">
	</div>
	<script type="text/javascript" src="../js/vue.js"></script>
	<script type="text/javascript">
		var vm = new Vue({
			el:"#app",
			data:{
				value:"陈昊",
			},
			methods:{
				test: function(){
					return "帅";
				}
			},
			watch:{
				value: function(c,o){
					console.log(c+this.test(),o)
				}
			}
		});
		vm.$watch("value",function(c,o){
			console.log(c,o)
		})
	</script>
</body>
</html>